﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using Mock1G3.BaseEntities;

namespace Mock1G3.DataAccess
{
    public class HistoryAccess
    {
        public static DataTable History1w(Card card)
        {
            //HttpContext.Current.Session["cardNo"] = "0123456789123456";
            //string cardNo = HttpContext.Current.Session["cardNo"].ToString();
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_1wViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
        public static DataTable History1m(Card card)
        {
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_1mViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
        public static DataTable History4m(Card card)
        {
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_4mViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
        public static DataTable History6m(Card card)
        {
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_6mViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
        public static DataTable History1y(Card card)
        {
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_1yViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
        public static DataTable History2y(Card card)
        {
            DataTable dt = DataAccess.ExeStoredWithParamToDataTable("dbo.[usp_2yViewHistory]", "@CardNo", card.CardNo);
            return dt;
        }
    }
}